﻿using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZyGames.Framework.Model;

namespace ZyGames.DZPocker.Model
{
	[Serializable, ProtoContract]
	[EntityTable(CacheType.Dictionary, DbConfig.Data)]
	public class FriendShip : BaseEntity
	{
		public FriendShip()
			: base(false)
		{
		}
		public FriendShip(int userid, int friendid)
			: this()
		{
			UserID = userid;
			FriendID = friendid;
		}

		/// <summary>
		/// 玩家ID
		/// </summary>        
		[ProtoMember(1)]
		[EntityField(true)]
		public int UserID { get; set; }

		/// <summary>
		/// 好友ID
		/// </summary>        
		[ProtoMember(2)]
		[EntityField(true)]
		public int FriendID { get; set; }
		protected override int GetIdentityId()
		{
			return UserID;
		}
	}
}
